<?php
/*
	获取活动信息
	问题，朋友圈商城是否所有的商品都作为活动商品？是！那么活动插件标识在何时加入？新增商品时！
*/
defined('BY_JYA') or exit('error');
list($goods_id,$active_id)=$arguments;
$member=$this->get('member',array('mid'=>$_SESSION['uid']));
$mygoods=array();
//经销商
if(!$member['type'] && $member['is_agent'] && $member['agent_id'] && $member['level_id']){
	$goods=pdo_get('jy_weishop_goods',array('id'=>$goods_id));
	$api_data=json_decode($goods['api_data'],true);
	$diyprice=$api_data['diyprice'];
	foreach($diyprice as $dv){
		if($dv['levelid']==$member['level_id']){
			$api_data['price']=$dv['price']?:$api_data['price'];
			break;
		}
	}
}
return $api_data;
